package com.rising.face.lock.synchronize;

/**
 * @Author: rising
 * @Description:
 * @Date: create in 2021/1/10 11:38
 */
public class Singleton {
    public int value = 5;

    private static Singleton singleton;

    public static Singleton getInstance() {
        if (singleton == null) {
            synchronized (Singleton.class) {
                if (singleton == null) {
                    singleton = new Singleton();
                }
            }
        }
        return singleton;
    }

}
